import { commonTableOptions } from '@/utils/util'

export const tableOption = function () {
  let self = this
  return {
    ...commonTableOptions,
    // height: self?.documentHeight - 450,
    searchMenuSpan: 12,
    menuWidth: 300,
    menu: true,
    header: true,
    addBtn: true,
    addBtnText: '预约',
    editBtnText: '修改时间',
    editBtn: true,
    delBtn: true,
    delBtnText: '重新预约',
    searchLabelWidth: 120,
    column: [
      {
        label: '加注站名称',
        prop: 'p1',
        search: true,
        overHidden: true,
        editDisplay: false,
      },
      {
        label: '预约时间',
        prop: 'p2',
        overHidden: true,
        addDisplay: false,
        editDisplay: false,
      },
      {
        label: '预到时间段',
        prop: 'p3',
        type: 'datetimerange',
        format: 'yyyy-MM-dd HH:mm:ss',
        valueFormat: 'yyyy-MM-dd HH:mm:ss',
        search: false,
        overHidden: true,
        width: 300
      },
      {
        label: '预约状态',
        prop: 'p4',
        search: true,
        dicData: [
          {
            label: '同意', value: '1'
          }, {
            label: '拒绝', value: '2'
          }, {
            label: '待确认', value: '3'
          }
        ],
        filterable: true,
        type: 'select',
        overHidden: true,
        addDisplay: false,
        editDisplay: false,
      },
      {
        label: '是否到时',
        prop: 'p5',
        overHidden: true,
        addDisplay: false,
        editDisplay: false,
      },
      {
        label: '船舶名称',
        prop: 'p6',
        overHidden: true,
        editDisplay: false,
        hide: true
      }
    ]
  }
}
